import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    // 主导航栏
    {
      path:'/',
      name:'',
      redirect:'/HomePage',
      component:() => import('../components/MainContent.vue'),
      children:[
        {
          path: 'HomePage',
          name: 'HomePage',
          component: () => import('../components/HomePage.vue'),   // 首页
        },
        {
          path:'SandTAchievements',
          name:'SandTAchievements',
          component: () => import('../components/SandTAchievements.vue')  // 精品成果
        },
        {
          path:'TechRequirements',
          name:'TechRequirements',
          component: () => import('../components/TechRequirements.vue')  // 重点需求
        },
        {
          path:'ExpertsThinkTank',
          name:'ExpertsThinkTank',
          component: () => import('../components/ExpertsThinkTank.vue')  // 专家智库
        },
        {
          path:'IndustrialCluster',
          name:'IndustrialCluster',
          component: () => import('../components/IndustrialCluster.vue')  // 机构专柜
        },
        {
          path:'PolicyInterpretation',
          name:'PolicyInterpretation',
          component: () => import('../components/PolicyInterpretation.vue')  // 政策动态
        },
        {
          path:'About',
          name:'About',
          component: () => import('../components/About.vue')      // 关于我们
        },
        {
          path:'AllAnnouncements',
          name:'AllAnnouncements',
          component: () => import('../components/HomePageGroup/AllAnnouncements.vue')  // 所有通知公告 // 适用于更多按钮
        },
        {
          path:'OneNoticeTp',
          name:'OneNoticeTp',
          component: () => import('../components/CommonTemplates/OneNoticeTp.vue')  // 具体一条通知
        },
        //成果细节
        {
          path:'/AchDetail',
          name:'AchDetail',
          component:()=>import('../components/SandTAchievementsGroup/AchDetail'),
        },
        //需求细节
        {
          path:'/ReqDetail',
          name:'ReqDetail',
          component:()=>import('../components/TechRequirementsGroup/ReqDetail'),
        },
        //需求细节
        {
          path:'/ExpertsDetail',
          name:'ExpertsDetail',
          component:()=>import('../components/ExpertsThinkTankGroup/ExpertsDetail'),
        },
        {
          path:'AllMoreTp',
          name:'AllMoreTp',
          component: () => import('../components/CommonTemplates/AllMoreTp.vue')  //  更多... 模板
        },
        {
          path:'IndustryDetailTp',
          name:'IndustryDetailTp',
          component: () => import('../components/CommonTemplates/IndustryDetailTp.vue')  // 具体某个机构的信息
        },
      ],
    },
    //发布成果
    {
      path:'/Result',
      name:'Result',
      // redirect:'/SandTachievements/ReleaseResultGroup.vue',
      component:()=>import('../components/SandTAchievementsGroup/ReleaseResultGroup.vue'),
      // children:[
      //   {
      //     path:'ReleaseResult',
      //     name:'ReleaseResult',
      //     component:() => import('../components/SandTAchievementsGroup/ReleaseResultGroup.vue')
      //   },
      // ]
    },
    //发布需求
    {
      path:'/Demand',
      name:'Demand',
      component:()=>import('../components/TechRequirementsGroup/Demand.vue'),

    },
    // 登录 注册 忘记密码
    {
      path:'/user',
      name:'user',
      redirect:'/user/login',
      component: () => import('../components/User.vue'),
      children:[
          {
            path:'/user/login',
            name:'Login',
            component: () => import('../components/LoginAndRegister/Login.vue')
          },
          {
            path:'/user/register',
            name:'Register',
            component: () => import('../components/LoginAndRegister/Register.vue')
          },
          {
            path:'/user/forgetPassword',
            name:'ForgetPassword',
            component: () => import('../components/LoginAndRegister/ForgetPassword.vue')
          },
      ]
    },
  ]
})
